952D - I'm Feeling Lucky - CodeForces Solution


probabilities *1800

Please click on ads to support us..

C++ Code:

#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define pf push_front
#define INeedToSpeed  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i, a, b) for(int i = (a); i <= (b); i++)
ll mod = 1e9 + 7;
ll N = 100311;
//ll dp[N][N];
//ll C(ll n, ll k)
//{
//    vector<vector<ll> > dp(n + 1, vector<ll>(n + 1, 1));
//    for (ll i = 0; i <= n; i++)
//    {
//        for (ll j = 1; j < i; j++)
//        {
//            dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j])% mod;
//        }
//    }
//    return dp[n][k] % mod;
//}
ll binpow(ll x, ll y)
{
    if(y == 0)
        return 1;
    if(y == 1)
        return x % mod;
    else if(y % 2 == 0)
    {
        ll w = binpow(x, y / 2) % mod;
        return (w * w) % mod;
    }
    else
        return ((x % mod) * (binpow(x, y - 1) % mod)) % mod;
}
int main()
{
    INeedToSpeed
//    freopen("input.txt","r",stdin);
//    freopen("output.txt","w",stdout);
    ll t = 1;
   // cin >> t;
    while(t--)
    {
      if(rand()%2 == 1)
        cout << "Red";
      else cout <<"Black";
    }
}

 	  		 			
		 	  		  
			 	  		 
  				 			
		    		  
 		    			
		 		 	 	 
	 	 		 	 	


Comments

Submit
0 Comments
More Questions

1546B - AquaMoon and Stolen String
1353C - Board Moves
902A - Visiting a Friend
299B - Ksusha the Squirrel
1647D - Madoka and the Best School in Russia
1208A - XORinacci
1539B - Love Song
22B - Bargaining Table
1490B - Balanced Remainders
264A - Escape from Stones
1506A - Strange Table
456A - Laptops
855B - Marvolo Gaunt's Ring
1454A - Special Permutation
1359A - Berland Poker
459A - Pashmak and Garden
1327B - Princesses and Princes
1450F - The Struggling Contestant
1399B - Gifts Fixing
1138A - Sushi for Two
982C - Cut 'em all
931A - Friends Meeting
1594A - Consecutive Sum Riddle
1466A - Bovine Dilemma
454A - Little Pony and Crystal Mine
2A - Winner
1622B - Berland Music
1139B - Chocolates
1371A - Magical Sticks
1253A - Single Push